package com.service.impl;

import com.dao.StudentinfoDao;
import com.dao.UserDao;
import com.pojo.StudentInfo;
import com.service.StudentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class StudentInfoServiceImpl implements StudentInfoService {

    @Autowired
    StudentinfoDao studentinfoDao;

    @Autowired
    UserDao userDao;

    @Override
    @Transactional
    public int insertInfo(StudentInfo studentInfo) {
        int i = studentinfoDao.insertInfo(studentInfo);
        return i;
    }

    @Transactional
    @Override
    public List<StudentInfo> searchByParam(String param) {
        return studentinfoDao.searchByParam(param);
    }

    @Transactional
    @Override
    public Integer deleteById(String id) {
        return studentinfoDao.deleteById(id);
    }

    @Transactional
    @Override
    public Integer updateById(StudentInfo studentInfo,Integer buildId) {
        return studentinfoDao.updateById(studentInfo,buildId);
    }
}
